package main.java.chessfootball.model.game;

/**
 * User: Igor
 * Date: 10.06.2011
 * Time: 21:52:07
 */
public class Cell
{
	private Integer x;
	private Integer y;

	public Cell(Integer x, Integer y)
	{
		this.x = x;
		this.y = y;
	}

	public Integer getX()
	{
		return x;
	}

	public Integer getY()
	{
		return y;
	}

	@Override
	public boolean equals(Object o)
	{
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		Cell cell = (Cell)o;

		if (!x.equals(cell.x)) return false;
		if (!y.equals(cell.y)) return false;

		return true;
	}

	@Override
	public int hashCode()
	{
		int result = x.hashCode();
		result = 31 * result + y.hashCode();
		return result;
	}
}
